@extends("layouts.master")

@section("body")
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h2><i class="fa fa-pencil red"></i><strong>修改订单状态</strong></h2>
            <div class="panel-actions">
                <a class="btn-close"><i class="fa fa-times"></i></a>
            </div>
        </div>
        <div class="panel-body">
            <input id='order_id' type="hidden" name="" value="{{ $order->id }}">
            <table id="user" class="table table-bordered table-striped" style="clear: both">
                <tbody> 
                    <tr>         
                        <td width="35%">商品名称</td>
                        <td width="65%">{{ $order['c_name'] }}</td>
                    </tr>
                    <tr>         
                        <td>商品图片</td>
                        <td>
                            <div style="margin-bottom:10px" class="col-md-3">
                                @foreach($order->c_picture_url as $picure)
                                <img class="img-thumbnail" src="{{ $picure }}" alt="上传图片显示">
                                @endforeach
                            </div>
                        </td>
                    </tr>  
                    <tr>         
                        <td>购买商品数量</td>
                        <td>{{ number_format($order->c_number,0) }}</td>
                    </tr>  
                    <tr>         
                        <td>商品所消耗积分</td>
                        <td>{{ number_format($order->c_integration,0) }}</td>
                    </tr>
                    <tr>         
                        <td>订单号</td>
                        <td>{{ $order->order_id }}</td>
                    </tr>
                    <tr>         
                        <td>收件人地址</td>
                        <td>{{ $order->address }}</td>
                    </tr>
                    <tr>         
                        <td>收件人电话</td>
                        <td>{{ $order->phone }}</td>
                    </tr>
                    <tr>         
                        <td>收件人称呼</td>
                        <td>{{ $order->collection_name }}</td>
                    </tr>
                    <tr>         
                        <td>订单状态</td>
                        <td>
                            <select id="status" class="form-control" data-rel="chosen">
                                @foreach($status as $key => $value)
                                <option value="{{ $key }}"
                                    @if($key == $order->status)
                                        selected="selected" 
                                    @endif
                                >{{ $value }}</option>
                            @endforeach
                    </select>
                        </td>
                    </tr>
                    <tr>         
                        <td>创建时间</td>
                        <td>{{ $order['created_at'] }}</td>
                    </tr>
                    <tr>         
                        <td>最后修改时间</td>
                        <td>{{ $order['updated_at'] }}</td>
                    </tr>                  
                </tbody>
            </table>
            <button id="update_btn" type="button" class="btn btn-primary btn-lg btn-block">修改</button>
            <br>
            <a href="javascript:history.back(-1)">                 
                <button type="button" class="btn btn-primary btn-lg btn-block">返回</button>
            </a>

        </div>
    </div>
</div>

@stop

@section('js')
    <script type="text/javascript" src="/js/js/pages/order/update.js"></script>
@stop